using PoemGame.Domain.PlayerAggregate;
using System;
using TechTalk.SpecFlow;

namespace SpecFlow.PoemGame.Domain.StepDefinitions
{
    [Binding]
    public class PlayerScoreIncreaseStepDefinitions
    {
        private Player player;
        [Given(@"玩家的初始分数为 (.*)")]
        public void Given玩家的初始分数为(int initScore)
        {
            player = new Player(Guid.NewGuid(), "Zhangsan", "张三", initScore);
        }

        [When(@"给玩家增加分数为 (.*)")]
        public void When给玩家增加分数为(int addedScore)
        {
            player.IncreaseScore(addedScore); 
        }

        [Then(@"玩家的最终分数为 (.*)")]
        public void Then玩家的最终分数为(int result)
        {
            Assert.Equal(result, player.Score);
        }
    }
}
